<template>
	<view>
		<view class="Unaudited" v-if="data==0">
			<view class="box">
				<image src="@/static/index/Unaudited.png" mode=""></image>
				<view class="title">
					审核中
				</view>
				<view class="text">
					审核通过后才可正常使用APP功能审核结果会议短信形式告知
				</view>
				<view class="btn" @click="quit()">
					更换账号
				</view>
			</view>
		</view>
		<view class="Unaudited" v-if="data==2">
			<view class="box">
				<image src="@/static/index/ybh.png" mode=""></image>
				<view class="title">
					审核失败
				</view>
				<view class="text">
					{{auditReason?auditReason:'审核通过后才可正常使用app功能，请您重新提交认证资料'}}
				</view>
				<view class="btn" @click="ModifyingInformation()">
					重新认证
				</view>
				<view class="btn" @click="quit()">
					更换账号
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "UnauditedPup",
		props: ["data", "auditReason"],
		data() {
			return {

			};
		},
		methods: {
			quit() {
				uni.showModal({
					title: '提示',
					content: '是否切换账号',
					success: function(res) {
						if (res.confirm) {
							uni.clearStorage()
							uni.reLaunch({
								url: `/pages/login/login`,
							})
						} else if (res.cancel) {
							console.log('用户点击取消')
						}
					},
				})
			},
			ModifyingInformation() {
				uni.showModal({
					title: '提示',
					content: '是否修改个人信息',
					success: function(res) {
						if (res.confirm) {
							uni.reLaunch({
								url: `/pages/my/EditingInformation/EditingInformation`,
							})
						} else if (res.cancel) {
							console.log('用户点击取消')
						}
					},
				})
			},
		}
	}
</script>

<style lang="less" scopde>
	.Unaudited {
		width: 100%;
		height: 100vh;
		position: fixed;
		z-index: 999;
		top: 0%;
		left: 0%;
		background-color: #00000080;


		.box {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			border-radius: 20rpx;
			width: 400rpx;
			min-height: 420rpx;
			background-color: #fff;
			text-align: center;
			padding: 20rpx;
			box-sizing: border-box;

			image {
				width: 205rpx;
				height: 168rpx;
			}

			.title {
				text-align: center;
				font-weight: bold;
				font-size: 36rpx;
				color: #333;
				margin-top: 20rpx;
			}

			.btn {
				font-weight: 500;
				font-size: 26rpx;
				color: #3E6EFE;
				margin-top: 25rpx;
			}

			.text {
				margin-top: 10rpx;
				width: 100%;
				color: #999;
				font-size: 26rpx;
				text-align: left;
			}
		}
	}
</style>